import os
from sqlalchemy import create_engine
# 当前路径
root_path = os.path.dirname(__file__)
# 开启debug
settings = {
    'debug': True,
    # 模板系统
    'template_path': os.path.join(root_path, 'templates'),
    # 静态文件
    'static_path':os.path.join(root_path,'static'),
    # 数据库
    'dbsettings':{
        'user':'root',
        'password':'200111',
        'hostname':'localhost',
        'port':3306,
        'dbname':'tornado',
    }
}
engine = create_engine('mysql+pymysql://{user}:{password}@{hostname}:{port}/{dbname}'.format(**settings['dbsettings']))